package com.ruoyi.yl.controller;


import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.domain.body.PayBody;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 微信支付相关接口
 */
@Slf4j
@RestController
@RequestMapping("/wx")
public class PayController {




    @PostMapping("/pay")
    public AjaxResult pay(@RequestBody PayBody pay) {



        return AjaxResult.success();
    }

    /**
     * 支付成功回调
     * @param pay
     * @return
     */
    @PostMapping("/pay/callBack")
    public AjaxResult payCallBack(@RequestBody PayBody pay) {



        return AjaxResult.success();
    }

    /**
     * 退款成功回调
     * @param pay
     * @return
     */
    @PostMapping("/refund/callBack")
    public AjaxResult refundCallBack(@RequestBody PayBody pay) {



        return AjaxResult.success();
    }


    /**
     * 轮训验证 订单支付 是否支付 成功 修改订单状态
     * @param pay
     * @return
     */
    @PostMapping("/verification")
    public AjaxResult verification(@RequestBody PayBody pay) {


        return AjaxResult.success();
    }


    /**
     *  订单退款
     * @param pay
     * @return
     */
    @PostMapping("/refund")
    public AjaxResult refund(@RequestBody PayBody pay) {


        return AjaxResult.success();
    }

}
